package com.specificgroup.jira.plugin.acpro.sync;

import java.util.List;
import java.util.ArrayList;

/**
 * @author Ivan Holub
 */
public class Sync {

    private List<Event> events = new ArrayList<Event>();

    public synchronized List<Event> readEvents() {
        List<Event> retValue = new ArrayList<Event>();
        retValue.addAll(events);
        events.clear();
        return retValue;
    }

    public synchronized void addEvent(Event event) {
        events.add(event);    
    }
}
